﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Koonsoft.HYCRM.BLL;
using Koonsoft.HYCRM.Model;

public partial class Auditors_SelectBankOther : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Bind();
        }
    }

    private void Bind()
    {
        string company = Request.QueryString["CompanyID"];
        string orderid = Request.QueryString["orderid"];
        GridView3.DataSource = new AuditorsBLL().GetCompanyBankOther(company, orderid);
        GridView3.DataBind();
    }

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            int Explain = Convert.ToInt32(e.Row.Cells[5].Text);
            ExplainEnum pStatus = (ExplainEnum)Explain;
            e.Row.Cells[5].Text = RemarkAttribute.GetEnumRemark(pStatus);

            int Currency = Convert.ToInt32(e.Row.Cells[3].Text);
            CurrencyEnum CStatus = (CurrencyEnum)Currency;
            e.Row.Cells[3].Text = RemarkAttribute.GetEnumRemark(CStatus);
        }

    }

    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        new AuditorsBLL().DeleteCompanyBank(e.Keys[0].ToString());

        Bind();
    }
}